////
// Glass effect
// Use this on image for better effect render
//
// Inspired from Simurai's IMDB redisign
//
// @link http://archive.simurai.com/lab/imdb/
// @thanks Simurai @simurai
///

@import "../pseudo-element";

@mixin effect-glass(
    $color: rgba(#fff, .12),
    $reflectDegree: -45deg,
    $border-radius: .2em,
    $border-color: rgba(#000, .2),
    $size: 50%,
    $size-fadeout: .5%
)
{
    position: relative;
    @include border-radius($border-radius);

    &:after
    {
        @include pseudo-element;
        overflow: hidden;
        top: 0;
        right: 0;
        bottom: 0;
        left: 0;
        border: 1px solid transparent; // transparent fallback
        border-color: $border-color;
        @include border-radius($border-radius);
        @include box-shadow(
            inset opacify($color, .6) 0 0 2px,   // inner glow
            inset rgba($color, .4) 0 0 10px // inner glow
        );
        @include background(linear-gradient($reflectDegree, $color, transparentize($color, .06) $size, transparentize($color, 1) $size + $size-fadeout));
    }
}